Add support for latest in query string#16
Conversation
| Error(_) -> #(package, version) | ||
| Ok(versions) -> { | ||
| case versions.releases { | ||
| [] -> #(package, version) |
There was a problem hiding this comment.
Perhaps we should mark it as "not found" or something? Otherwise the version will be "latest" forever, which means the search never runs.
| [] -> #(package, version) | |
| [] -> #(package, "not found") |
There was a problem hiding this comment.
Actually, I think this branch is not possible. All packages will have at least one version... but I posted a comment above to add packages with zero versions, so we can mark them as "not found" (or alternatively as "0.0.0"). Otherwise the search never runs if one package fails.
| versions: Loss(List(hexpm.Package)), | ||
| ) -> #(Model, Effect(a)) { | ||
| case versions { | ||
| Error(_) -> #(model, toast.error("Server error. Retry later.")) |
There was a problem hiding this comment.
I think we need to mark that this package has no version in the error case. So we can go and mark it as not found later on. See comment below.
|
I wil remove the echo and tackle what is pending :D |
|
💚 💙 💜 💛 ❤️ |
Thanks! 💜 |
Here is the support for
latestin query string!I let a comment to indicate where to put a loader if you want.
Fixes: